The policy introduced for T206476 creates a subtle failure mode: any test
writing to stdout will cause headers to be sent, causing later tests to
fail when they try to call header().
Instead, call ob_start() to intercept test output. Any buffered output is
still seen when PHPUnit exits.
Bug: T206476
Change-Id: Id085efeab67d1e700ffcbf37868b5107e3a7e5d5
exit( 1 );
}
+ // Start an output buffer to avoid headers being sent by constructors,
+ // data providers, etc. (T206476)
+ ob_start();
+
fwrite( STDERR, defined( 'HHVM_VERSION' ) ?
'Using HHVM ' . HHVM_VERSION . ' (' . PHP_VERSION . ")\n" :
'Using PHP ' . PHP_VERSION . "\n" );